{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Mainh where
import           Text.Shakespeare.Text
import qualified Data.Text.Lazy.IO          as TLIO
import           Data.Text             (Text)
import           Control.Monad         (forM_)
import Text.Blaze.Html.Renderer.String(renderHtml)
import Text.Hamlet(HtmlUrl,hamlet)

data MyRoute = Home | Time | Stylesheet

render::MyRoute->[(Text,Text)]->Text
render _ _ =""

data Item =Item{itemName :: Text
                ,itemQty::Int
                }
items::[Item]
items = [ Item{itemName="apples" ,itemQty = 5}
          ,Item{itemName="bananas",itemQty=6}

        ]
main :: IO()
main = forM_ items $ \item -> putStrLn $ renderHtml $ [hamlet|
<lable>You have #{show $ itemQty item} ${itemName item}.
|] render
